<?php
namespace app\common\controller;
use think\Request;
use app\common\controller\Init;

class Base extends Init
{
    public function _initialize()
    {
        parent::_initialize();
		try {
	        $request = Request::instance();
	        if (strpos($request->routeInfo()['route'],'logOut') === false) {
	        	if ($this->userInfo) {
			        if ($this->keyInfo['userRegVerify'] == 'email' && !$this->userInfo['verify_email']) {
		                header('HTTP/1.1 302 Moved Permanently');
		                header('Location: ' . $this->domain . '/verifyEmail/');
		                exit();
			        }
	        	}
	        }
		} catch (\Exception $e) {}
    }
    
}
